class ConditonCardResult {
  late bool flag;
  late int code;
  late String message;
  late ConditonCard data;

  ConditonCardResult({required this.flag, required this.code, required this.message, required this.data});

  ConditonCardResult.fromJson(Map<String, dynamic> json) {
    flag = json['flag'];
    code = json['code'];
    message = json['message'];
    data = (json['data'] != null ? new ConditonCard.fromJson(json['data']) : null)!;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['flag'] = this.flag;
    data['code'] = this.code;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    return data;
  }
}

class ConditonCard {
  late List<ArticlePreviewDTOList> articlePreviewDTOList;
  late String name;

  ConditonCard({required this.articlePreviewDTOList, required this.name});

  ConditonCard.fromJson(Map<String, dynamic> json) {
    if (json['articlePreviewDTOList'] != null) {
      articlePreviewDTOList = <ArticlePreviewDTOList>[];
      json['articlePreviewDTOList'].forEach((v) {
        articlePreviewDTOList.add(new ArticlePreviewDTOList.fromJson(v));
      });
    }
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.articlePreviewDTOList != null) {
      data['articlePreviewDTOList'] =
          this.articlePreviewDTOList.map((v) => v.toJson()).toList();
    }
    data['name'] = this.name;
    return data;
  }
}

class ArticlePreviewDTOList {
  late int id;
  late String articleCover;
  late String articleTitle;
  late String createTime;
  late int categoryId;
  late String articleHeat;
  late String categoryName;
  late List<TagDTOList> tagDTOList;

  ArticlePreviewDTOList(
      {required this.id,
      required this.articleCover,
        required this.articleTitle,
        required this.createTime,
        required this.categoryId,
        required this.categoryName,
        required this.tagDTOList,
        required this.articleHeat});

  ArticlePreviewDTOList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    articleCover = json['articleCover'];
    articleTitle = json['articleTitle'];
    createTime = json['createTime'];
    categoryId = json['categoryId'];
    categoryName = json['categoryName'];
    articleHeat = json['articleHeat'];
    if (json['tagDTOList'] != null) {
      tagDTOList = <TagDTOList>[];
      json['tagDTOList'].forEach((v) {
        tagDTOList.add(new TagDTOList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['articleCover'] = this.articleCover;
    data['articleTitle'] = this.articleTitle;
    data['createTime'] = this.createTime;
    data['categoryId'] = this.categoryId;
    data['categoryName'] = this.categoryName;
    if (this.tagDTOList != null) {
      data['tagDTOList'] = this.tagDTOList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class TagDTOList {
  late int id;
  late String tagName;

  TagDTOList({required this.id, required this.tagName});

  TagDTOList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    tagName = json['tagName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['tagName'] = this.tagName;
    return data;
  }
}